package com.heima.common.exception;

import com.heima.common.enums.AppHttpCodeEnum;
import lombok.Getter;

@Getter
public class LeadException extends RuntimeException{

    private int status;

    public LeadException(int status,String message) {
        super(message);
        this.status = status;
    }

    public LeadException(int status,String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }

    public LeadException(AppHttpCodeEnum enums) {
        super(enums.getErrorMessage());
        this.status = enums.getCode();
    }
}
